package com.eduran.tuts.jfundamentals.model;

import java.security.SecureRandom;

public class RollDieArray {

    public static void main(String[] args) {

        SecureRandom randomNumbers = new SecureRandom();
        int[] frequency = new int[7];
        for (int roll = 1; roll <= 6000000; roll++) {
            ++frequency[1 + randomNumbers.nextInt(6)];
        }
        System.out.println("Face\tFrequency");
        for (int face = 0; face < frequency.length; face++) {
            System.out.printf("%4d%10d%n", face, frequency[face]);
        }
    }
}
